// 商品管理
import request from '@/utils/request'

// 可售商品列表
export function saleGoodsList(params) {
    return request({
        url: '/mall-admin/mall/goods/saleGoodsList',
        method: 'get',
        params
    })
}

// 新增可售商品
export function updateCommodityClass(params) {
    return request({
        url: '/mall-admin/mall/merchantGoods/save',
        method: 'post',
        params
    })
}

// 获取可售商品详情
export function getSaleGoodsInfo(params) {
    return request({
        url: '/mall-admin/mall/goods/getSaleGoodsInfo',
        method: 'get',
        params
    })
}

// 保存可售套餐
export function SaveSetMeal(data) {
    return request({
        url: '/mall-admin/mall/goods/SaveSetMeal',
        method: 'post',
        data,
        typeData:'JSON'
    })
}

// 获取套餐详情
export function getSetMealInfo(params) {
    return request({
        url: '/mall-admin/mall/goods/getSetMealInfo',
        method: 'get',
        params
    })
}

// 营地研学

// 获取研学类别
export function getSpuList(params) {
    return request({
        url: '/mall-admin/mall/spu/getlist',
        method: 'get',
        params
    })
}

// 获取营地列表
export function getCampList(params) {
    return request({
        url: '/mall-admin/mall/camp/getGoodList',
        method: 'get',
        params
    })
}

// 新增编辑营地
export function saveCampGoods(data) {
    return request({
        url: '/mall-admin/mall/camp/saveGoods',
        method: 'post',
        data,
        typeData:'JSON'
    })
}

// 营地详情
export function getCampDetail(params) {
    return request({
        url: '/mall-admin/mall/camp/goodsInfo',
        method: 'get',
        params
    })
}

// 研学商品列表
export function getCampSaleGoodsList(params) {
    return request({
        url: '/mall-admin/mall/camp/getCampSaleGoodsList',
        method: 'get',
        params
    })
}


// 新增研学商品时获取营地spu格式
export function getCampTimeInfo(params) {
    return request({
        url: '/mall-admin/mall/camp/getCampTimeInfo',
        method: 'get',
        params
    })
}

// 保存研学可售商品
export function saveCampSaleGoods(data) {
    return request({
        url: '/mall-admin/mall/camp/saveSaleGoods',
        method: 'post',
        data,
        typeData:'JSON'
    })
}

// 研学可售商品详情
export function getCampSaleGoods(params) {
    return request({
        url: '/mall-admin/mall/camp/getSaleGoods',
        method: 'get',
        params
    })
}

// 获取小程序太阳码
export function downloadMiniCode(data) {
    return request({
      url: '/mall-admin/oss/file/downloadMiniCode',
      method: 'post',
      data
    })
  }

// 获取商品推广选择渠道
export function geChannelActivityList(params) {
    return request({
        url: '/mall-admin/mall/mallMerchantChannel/channel/geChannelActivityList',
        method: 'get',
        params
    })
}

// 短链接
export function createUrl(data) {
    return request({
        url: '/cdc-system/system/forward/create',
        method: 'post',
        data
    })
}

// 推荐
export function updateTop(data) {
    return request({
        url: '/mall-admin/mall/saleGoods/updateTop',
        method: 'post',
        data
    })
}

// 获取省市区列表
export function getRegionList(params) {
    return request({
        url: '/ucenter-admin/ucenter/region/getList',
        method: 'get',
        params
    })
}

// 新增编辑区域
export function upDateRegion(data) {
    return request({
        url: '/ucenter-admin/ucenter/region/save',
        method: 'post',
        data
    })
}

// 热门区域
export function updateRegionType(data) {
    return request({
        url: '/ucenter-admin/ucenter/region/updateRegionType',
        method: 'post',
        data
    })
}

// 取消热门区域
export function delRegionType(data) {
    return request({
        url: '/ucenter-admin/ucenter/region/delRegionType',
        method: 'post',
        data
    })
}

// 查询商户扩展信息
export function getById(params) {
    return request({
        url: '/mall-admin/mall/goods/saleGoodsYz/getById',
        method: 'get',
        params
    })
}

// 保存商户扩展信息
export function saveYzInfo(data) {
    return request({
        url: '/mall-admin/mall/goods/saleGoodsYz/save',
        method: 'post',
        data
    })
}













